<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../header.jsp">
	<jsp:param value="组织-收款与签约 " name="title" />
</jsp:include>
<link href="static/css/base-css.css" rel="stylesheet" type="text/css">
<link href="static/css/teacher.css" rel="stylesheet" type="text/css">
<link href="static/css/position.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="static/js/postion.js"></script>
<script type="text/javascript" src="static/js/student.js"></script>
<script type="text/javascript">
	$(function() {
		$('.ui.floating.dropdown.labeled.icon.button').dropdown();
		$('.ui.teal.basic.button');
		$('.ui.fluid.popup.bottom.left.transition.hidden');
		$('.ui.four.column.relaxed.divided.grid')
	});
</script>
</head>
<body>
	<jsp:include page="../menu/menue.jsp"></jsp:include>
	<div class="teacher-content"
		style="margin-left: 150px; margin-right: 100px; margin-top: 50px;">

		<div class="ui form"></div>
		<table class="ui sortable celled table">
			<thead>
				<tr>
					<th colspan="9" style="vertical-align: middle;">
						<div style="float: left;">
							<c:if test="${url eq 'student/haventpay' }">未缴清学员</c:if>
							<c:if test="${url eq 'student/payed' }">已缴清学员</c:if>
						</div>
						<div class="ui mini icon input" style="float: right;">
							<div class="ui floating dropdown labeled icon button">
								<i class="filter icon"></i> <span class="text"> <c:if
										test="${url eq 'student/haventpay' }">未缴清</c:if> <c:if
										test="${url eq 'student/contract' }">未签约</c:if> <c:if
										test="${url eq 'student/payed' }">已缴清</c:if>
								</span>
								<div class="menu">
									<div class="divider"></div>
									<a class="item" style="color: black;" href="student/contract">
										<span class="ui blue empty circular label"
										style="margin-right: 10px;"></span> 未签约
									</a> <a class="item" style="color: black;" href="student/haventpay">
										<span class="ui red empty circular label"
										style="margin-right: 10px;"></span> 未缴清
									</a> <a style="color: black;" class="item" href="student/payed">
										<span class="ui green empty circular label"
										style="margin-right: 10px;"> </span> 已缴清
									</a>
								</div>
							</div>
							<div>&nbsp;&nbsp;</div>
						</div>
					</th>
				</tr>
				<tr>
					<th colspan="9"><a class="ui teal basic button" tabindex="0"
						href="student/search_pay_record">查询收款记录</a>
						<div class="ui mini icon input" style="float: right;">
							<form>
								<input type="text" name="name" placeholder="输入学生名字搜索"
									value="${param.name}">&nbsp;&nbsp;&nbsp;
							</form>
						</div></th>
				</tr>
				<tr id="tr1">
				<th>姓名</th>
					<th><c:choose>
							<c:when test="${url eq 'student/payed' }">性别</c:when>
							<c:otherwise>学费</c:otherwise>
						</c:choose></th>
					<th><c:choose>
							<c:when test="${url eq 'student/payed' }">学历</c:when>
							<c:otherwise>欠缴</c:otherwise>
						</c:choose></th>
					<th>电话</th>
					<th>咨询师</th>
					<th><c:choose>
							<c:when test="${url eq 'student/payed' }">创建时间</c:when>
							<c:otherwise>上次缴费</c:otherwise>
						</c:choose></th>
					<th>学员状态</th>
					<c:if test="${url eq 'student/haventpay' }">
						<th>收款</th>
					</c:if>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${stuList}" var="student">
					<tr id="tr2">
						<td class="collapsing"><a
							href="student/pay_detail?stuId=${student.id}">${student.name}
						</a></td>
						<td class="collapsing"><c:choose>
								<c:when test="${url eq 'student/payed' }">${student.gender}</c:when>
								<c:otherwise>${student.duePay}</c:otherwise>
							</c:choose></td>
						<td class="collapsing"><c:choose>
								<c:when test="${url eq 'student/payed' }">${student.education}</c:when>
								<c:otherwise>${student.noPay}</c:otherwise>
							</c:choose></td>
						<td class="collapsing">${student.phone}</td>
						<td class="collapsing">${student.counselorName}</td>
						<td class="collapsing"><c:choose>
								<c:when test="${url eq 'student/payed' }">
									<fmt:formatDate value="${student.createTime}" type="date" />
								</c:when>
								<c:otherwise>
									<fmt:formatDate value="${student.payDate }" type="both" />
								</c:otherwise>
							</c:choose></td>
						<td class="collapsing">${student.stuGradeText}</td>
						<c:if test="${url eq 'student/haventpay' }">
							<td class="collapsing"><a class="ui teal basic button"
								tabindex="0" href="student/pay?id=${student.id}">付款</a></td>
						</c:if>
					</tr>
				</c:forEach>
				<c:if test="${empty stuList}">
					<tr>
						<td style="text-align: center;" colspan="8">暂无记录</td>
					</tr>
				</c:if>
			</tbody>
		</table>
		<label>&nbsp;</label>
		<c:if test="${totalPage > 1 }">
			<div class="page">
				<a <c:if test="${page!=1}">href="${url}?page=1${queryString}"</c:if>
					class="${page == 1?'disable':''}">首页</a> <a
					<c:if test="${page!=1}">href="${url}?page=${page-1}${queryString}"</c:if>
					class="${page == 1?'disable':''}">上一页</a> <a
					<c:if test="${page!=totalPage}">href="${url}?page=${page+1 }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}">下一页</a> <a
					<c:if test="${page!=totalPage}">href="${url}?page=${totalPage }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}">最后一页</a> <span>
					${page}/${totalPage} </span>
			</div>
		</c:if>
	</div>
</body>
</html>